app.controller('quizCtrl',["$scope", "$state", "$ionicSlideBoxDelegate", "quizData", function($scope, $state, $ionicSlideBoxDelegate, quizData) {
  // Called to navigate to the main app
  quizData.getQuizData().then(function(){
     $scope.quiz= quizData.Data;
     $ionicSlideBoxDelegate.update();
     // for(var i=0; i<$scope.quiz.length;i++){
     //  if()
     //    http://pic.yupoo.com/oiui/EIWo3LdF/chFTf.png
     // }
  })
 


  $scope.startApp = function() {
    $state.go('eventmenu.chemistry');
  };
  $scope.next = function() {
    $ionicSlideBoxDelegate.next();
  };
  $scope.previous = function() {
    $ionicSlideBoxDelegate.previous();
  };

  // Called each time the slide changes
  $scope.slideChanged = function(index) {
    $scope.slideIndex = index;
  };
}])